package org.easy.eao.spring.schema;

import java.util.HashSet;
import java.util.Set;

import org.easy.eao.Action;

@SuppressWarnings("unchecked")
public enum EaoType {
	
	Hibernate(new Class[] {
			org.easy.eao.spring.hibernate.PersistAction.class,
			org.easy.eao.spring.hibernate.RemoveAction.class,
			org.easy.eao.spring.hibernate.MergeAction.class,
			org.easy.eao.spring.hibernate.RetrieveAction.class,
			org.easy.eao.spring.hibernate.QueryAction.class,
			org.easy.eao.spring.hibernate.PagingAction.class,
			org.easy.eao.spring.TargetAction.class
	}),
	JPA(new Class[]{
			org.easy.eao.spring.jpa.PersistAction.class,
			org.easy.eao.spring.jpa.RemoveAction.class,
			org.easy.eao.spring.jpa.MergeAction.class,
			org.easy.eao.spring.jpa.RetrieveAction.class,
			org.easy.eao.spring.jpa.QueryAction.class,
			org.easy.eao.spring.jpa.PagingAction.class,
			org.easy.eao.spring.TargetAction.class
	});
	
	private Set<Class<Action<?>>> defaultActions = new HashSet<Class<Action<?>>>();
	
	private EaoType(Class<Action<?>>[] actions) {
		for (Class<Action<?>> action : actions)
			defaultActions.add(action);
	}

	public Set<Class<Action<?>>> getDefaultActions() {
		return defaultActions;
	}
}
